#include <iostream>
using namespace std;

class calculator 
{
public:
	int a;
	int b;

	virtual int calculate()
	{
		return 0;
	};
};

class add : public calculator
{
	public:
	int calculate () override
	{
		return a + b;
	}
};

class sub : public calculator
{
	public:
	int calculate() override
	{
		return a - b;
	}
};

class mul : public calculator
{
	public:
	int calculate() override
	{
		return a * b;
	}
};

class _div : public calculator
{
	public:
	int calculate() override
	{
		if (b==0)
		{
			return -1; // error handling
		}
		
		return a / b;
	}
};

void user_input(calculator &obj)
{
    obj.a = 10;
    obj.b = 5;
	std::cout << obj.calculate() <<std::endl;
}

int main()
{
	 add obj1;
	 user_input(obj1);

	 sub obj2;
	 user_input(obj2);

	 mul obj3;
	 user_input(obj3);

	_div obj4;
	user_input(obj4);
	return 0;
}